<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddColumnAssignStatusInTaskTable extends AbstractMigration
{
    public function up()
    {
        $this->table('task')
            ->addColumn('assign_status', 'enum', [
                'values' => 'default,wait_confirm,accepted,rejected',
                'null' => false,
                'default' => 'default',
                'comment' => '任务分配状态',
            ])
            ->save();
    }

    public function down()
    {
        $this->table('task')->removeColumn('assign_status')->save();
    }
}
